<!DOCTYPE html>
<html>
{% include 'common.html' %}
<body>
<div>
    <!--主体内容-->
    <div class="page-content-wrap">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <div class="layui-inline tool-btn">
                            <button type="button" class="layui-btn layui-btn-small layui-btn-normal addBtn hidden-xs"
                                    id="add_book_btn"><i
                                    class="layui-icon">&#xe654;</i></button>
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <label class="layui-form-label">书籍名称</label>
                        <div class="layui-input-inline">
                            <input type="text" id="search_book_name" placeholder="请输入" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <label class="layui-form-label">书籍类型</label>
                        <div class="layui-input-inline">
                            <select id="search_book_type">
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <label class="layui-form-label">出版时间</label>
                        <div class="layui-input-inline">
                            <input type="text" id="search_book_publish_date" lay-verify="date" placeholder="请选择日期"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="button" class="layui-btn layui-btn-normal" id="search_confirm_btn">查询</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-form" id="table-list">
            <table class="layui-hide" id="bookTypeTable" lay-filter="bookType_table_tool_bar_filter"></table>
        </div>
    </div>
    {% include 'common.html' %}
    <div id="template_add" style="display:none;">
        <form class="layui-form layui-form-pane" action="" lay-filter="" id="add_book_form" style="margin: 30px">
            <!-- <input type="hidden" id="book_type_id">-->
            <div class="layui-form-item">
                <label class="layui-form-label">书籍名称</label>
                <div class="layui-input-inline">
                    <input type="text" id="add_book_name" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书价格</label>
                <div class="layui-input-inline">
                    <input type="text" id="add_book_price" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书数量</label>
                <div class="layui-input-inline">
                    <input type="text" id="add_book_count" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书类别</label>
                <div class="layui-input-inline">
                    <select id="add_book_type">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">出版商</label>
                <div class="layui-input-inline">
                    <input type="text" id="add_book_publish" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">出版日期</label>
                    <div class="layui-input-inline">
                        <input type="text" name="date" id="add_book_publish_date" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-upload">
                <button type="button" class="layui-btn" id="add_image_upload">上传图片</button>
                <div class="layui-upload-list ">
                    <img class="layui-upload-img" id="add_image_upload_pre">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">文本域</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" class="layui-textarea" id="add_book_introduction"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="button" class="layui-btn layui-btn-normal" id="add_book_confirm_btn">确定</button>
                    <button type="button" class="layui-btn layui-btn-normal" id="add_book_quit_btn">取消</button>
                </div>
            </div>
        </form>
    </div>
    <div id="template_edit" style="display:none;">
        <form class="layui-form layui-form-pane" action="" lay-filter="" id="edit_book_form" style="margin: 30px">
            <input type="hidden" id="book_id">
            <div class="layui-form-item">
                <label class="layui-form-label">书籍名称</label>
                <div class="layui-input-inline">
                    <input type="text" id="edit_book_name" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书价格</label>
                <div class="layui-input-inline">
                    <input type="text" id="edit_book_price" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书类别</label>
                <div class="layui-input-inline">
                    <select id="edit_book_type">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图书数量</label>
                <div class="layui-input-inline">
                    <input type="text" id="edit_book_count" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">出版商</label>
                <div class="layui-input-inline">
                    <input type="text" id="edit_book_publish" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">出版日期</label>
                    <div class="layui-input-inline">
                        <input type="text" name="date" id="edit_book_publish_date" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-upload">
                <button type="button" class="layui-btn" id="edit_image_upload">上传图片</button>
                <div class="layui-upload-list ">
                    <img class="layui-upload-img" id="edit_image_upload_pre">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">文本域</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" class="layui-textarea" id="edit_book_introduction"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="button" class="layui-btn layui-btn-normal" id="edit_book_confirm_btn">确定</button>
                    <button type="button" class="layui-btn layui-btn-normal" id="edit_book_quit_btn">取消</button>
                </div>
            </div>
        </form>
    </div>
    <script type="text/html" id="bookType_table_tool_bar">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
    <script src="/static/admin/jslib/book.js" type="text/javascript" charset="utf-8"></script>
</div>
</body>
</html>
